package com.app.mapper;

import com.app.model.PlatformChangeRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * <p>
 * 平台用户记录 Mapper 接口
 * </p>
 *
 * @author yoominic
 * @since 2024-07-18
 */
public interface PlatformChangeRecordMapper extends BaseMapper<PlatformChangeRecord> {


    BigDecimal statisticalPlatformVoucherValue(@Param("startTime") String startTime,
                                               @Param("endTime") String endTime);

    BigDecimal statisticalOtherVoucherValue(@Param("startTime") String startTime,
                                            @Param("endTime") String endTime);

    BigDecimal statisticalPlatformPointsValue(@Param("startTime") String startTime,
                                              @Param("endTime") String endTime);

    BigDecimal statisticalOtherPointsValue(@Param("startTime") String startTime,
                                           @Param("endTime") String endTime);

    IPage<PlatformChangeRecord> platformUserList(Page<PlatformChangeRecord> p,
                                                 @Param("type") Integer type,
                                                 @Param("typeName") String typeName,
                                                 @Param("startTime") String startTime,
                                                 @Param("endTime") String endTime);
}
